/**
 * 作者: wgx
 * 日期: 2024-12-20 09:52:30
 * 备注: 荣誉奖励(全服或是个人)奖励配置表
 */
package com.motu.monstercity.server.game.commondata.maintask;

import io.vertx.core.json.JsonObject;

public class HonorRewardModel {
    protected int id; // 数据库id
    protected int honorType; // 荣誉类型
    protected int type; // 类型1-全服,2-个人
    protected long num; // 条件
    protected String reward; // 奖励 (itemid;num)

    public HonorRewardModel() {
    }

    public HonorRewardModel(JsonObject obj) {
        id = obj.containsKey("id") ? obj.getInteger("id") : 0;
        honorType = obj.containsKey("honor_type") ? obj.getInteger("honor_type") : 0;
        type = obj.containsKey("type") ? obj.getInteger("type") : 0;
        num = obj.containsKey("num") ? obj.getLong("num") : 0;
        reward = obj.containsKey("reward") ? obj.getString("reward") : "";
    }

    public int getId() {
        return id;
    }

    public int getHonorType() {
        return honorType;
    }

    public int getType() {
        return type;
    }

    public long getNum() {
        return num;
    }

    public String getReward() {
        return reward;
    }

}
